package com.java.dp.observe;

/**
 * @Author lizhilong
 * @create 2019/12/10 17:53
 * @desc 抽象的观察者的实现
 */
public class ObserverImpl implements Observer {

    private String name;

    public ObserverImpl(String name) {
        this.name = name;
    }

    @Override
    public void update(String message) {
        System.out.println("【" + name + "】" + "收到了：" + message);
    }
}
